Skip to content

Conversation

@khoa-nguyen-18
Copy link
Contributor

Move the place to store bsp from .code_in_ram section to .ramfunc section

@KhiemNguyenT
Copy link
Collaborator

@khoa-nguyen-18 please explain a bit more about the advantages of this patch.

@khoa-nguyen-18
Copy link
Contributor Author

Currently, there is an issue related to storing the flash_hp API in RAM.
The current case is that some critical APIs of r_flash_hp cannot remain in ROM because, during the erasure of code flash, the APIs might also be erased. Therefore, we will store these critical APIs in RAM and place them in a sector defined in the linker as .code_in_ram.
image
Previously, when we defined it this way, it would be allocated right after the bss and noinit sections.
But a few days ago, there was a PR (zephyrproject-rtos/zephyr#74042) to move the bss and noinit sections for the Cortex-M series to the end of the linker script file. Since then, our .code_in_ram section has been unable to hold the content of the flash APIs. I suspect this is because the .code_in_ram section was not defined correctly. Therefore, I’ve decided to use the .ramfunc section which is already defined in the Cortex-M linker instead of using a custom-defined section.
image

@duynguyenxa
Copy link
Member

@khoa-nguyen-18 , Since we've made change in the FSP library, could you please help to update the patch note the the README file

Move the place to store bsp from .code_in_ram section to .ramfunc

Signed-off-by: Khoa Nguyen <[email protected]>
@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra_flash_hp branch from f8a4089 to 2546d64 Compare December 27, 2024 02:16
@khoa-nguyen-18
Copy link
Contributor Author

@khoa-nguyen-18 , Since we've made change in the FSP library, could you please help to update the patch note the the README file

I have updated it in README file

@KhiemNguyenT KhiemNguyenT merged commit 64fce2e into zephyrproject-rtos:main Dec 27, 2024
@khoa-nguyen-18 khoa-nguyen-18 deleted the support_renesas_ra_flash_hp branch April 23, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants